package com.egao.common.module.student.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.egao.common.module.student.entity.StudentInten;
import com.egao.common.module.student.mapper.StudentIntenMapper;
import com.egao.common.module.student.service.StudentIntenService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * @author lym
 * @date 2022/5/16 16:49
 */
@Service
public class StudentIntenServiceImpl extends ServiceImpl<StudentIntenMapper, StudentInten> implements StudentIntenService {

    @Override
    public List<Map<String, Object>> kgStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.kgStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<Map<String, Object>> kgTypeStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.kgTypeStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<Map<String, Object>> sxStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.sxStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<Map<String, Object>> sxMajorStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.sxMajorStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<Map<String, Object>> kyStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.kyStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<Map<String, Object>> kyMajorStatistics(Integer yearId, List<String> collegeCodes, List<String> bjhms) {
        List<Map<String, Object>> maps = baseMapper.kyMajorStatistics(yearId, collegeCodes, bjhms);
        Collections.reverse(maps);
        return maps;
    }

    @Override
    public List<StudentInten> listAll(Integer yearId) {
        return baseMapper.listAll(yearId);
    }
}
